package cn.yunhe.biz.impl;

import cn.yunhe.biz.IDeptBiz;
import cn.yunhe.dao.IDeptDao;
import cn.yunhe.model.Dept;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service("deptBiz")
public class DeptBizImpl implements IDeptBiz {
    @Resource(name="deptDao")
    private IDeptDao deptDao;
    public List<Dept> queryAllDept() {
        List<Dept> list = deptDao.queryAllDept();
        System.out.println("biz执行了queryAllDept方法");
        return list;

    }

    public void addDept(Dept dept) {
        deptDao.addDept(dept);
    }


    public void delDept(Dept dept) {
        deptDao.delDept(dept);
    }

    public IDeptDao getDeptDao() {
        return deptDao;
    }

    public void setDeptDao(IDeptDao deptDao) {
        this.deptDao = deptDao;
    }
}
